var result=false;
var message="";
var nodeRefPrefix="workspace://SpacesStore/";

var nodeId = args.nodeId;
var document={};
if(nodeId.match("^"+nodeRefPrefix)==nodeRefPrefix){
	// starts with nodeRef Prefix
	document= search.findNode(args.nodeId);
}else{
	document = search.findNode("workspace://SpacesStore/"+args.nodeId);
}


try {
	result = document.removeAspect(args.aspectName);
} catch (e) {
	message = e.message;
}
if(message=="") model.result=result.toString();
else model.result=message;